import Taro, {Component,request,showLoading, redirectTo} from '@tarojs/taro'
import {View, Button,Text, Image,ScrollView, Swiper, SwiperItem, Input,} from '@tarojs/components'
import {connect} from '@tarojs/redux'
import {add,minus,asyncAdd,ooo,re} from '../../actions/counter'
import {imgUrl} from '../../config'
import './hfDetail.scss'

@connect(({
  counter
}) => ({
  counter
}), (dispatch) => ({
  add() {
    dispatch(add())
  },
  dec() {
    dispatch(minus())
  },
  asyncAdd() {
    dispatch(asyncAdd())
  },
  haha() {
    dispatch(ooo(0))
  },
  // re(){
  //   dispatch(re())
  // }
}))


class HfDetail extends Component {

  // config = {
  //   navigationBarTitleText: '首页'
  // }
  constructor(props) {
    super(props)
    this.state = {
      value: "<"
    }
  }

  componentWillMount() {}
  componentDidMount() {

  }
  back() {
    redirectTo({
      url: '/pages/tzDetail/tzDetail'
    })
  }
  render() {
    return ( 
        <View className = 'index' >
            <View className='head'>
              <Text className='close' onClick={this.back}>{this.state.value}</Text>
              <Text className='name'>2条回复</Text>
            </View>
            <View className='detail'>
                <View className='detailTop'>
                    <Image src={`${imgUrl}/tou.png`} className='touPic' />
                    <View className='name'>熊猫吃锤子</View>
                    <View className='gz'>+ 关注</View>
                </View>
                <View className='hf'>这个活动很不错的啊</View>
                <View className='timeDetail'>
                    <View className='time'>06-27 11:24</View>
                    <Image src={`${imgUrl}/zan.png`}  className='zan'/>
                    <Text className='text2'>168</Text>
                </View>
            </View>
            <View className='allHf'>
                <View className='tit'>全部回复</View>
                <View className='list'>
                    <View className='left'>
                        <Image src={`${imgUrl}/tou.png`} className='pic'/>
                        <View className='who'>
                            <View className='text'>熊猫吃锤子</View>
                            <View className='text1'>是啊，还可以</View>
                            <View className='text2'>06-27 11:24 · 回复</View>
                        </View>
                    </View>
                    <View className='right'>
                        <Image src={`${imgUrl}/zan.png`}  className='zan'/>
                        <Text className='text2'>168</Text>
                    </View>
                </View>
                <View className='list'>
                    <View className='left'>
                        <Image src={`${imgUrl}/tou.png`} className='pic'/>
                        <View className='who'>
                            <View className='text'>熊猫吃锤子</View>
                            <View className='text1'>是啊，还可以</View>
                            <View className='text2'>06-27 11:24 · 回复</View>
                        </View>
                    </View>
                    <View className='right'>
                        <Image src={`${imgUrl}/zan.png`}  className='zan'/>
                        <Text className='text2'>168</Text>
                    </View>
                </View>
            </View>
            <View className='footer'>
                <Input type='text' placeholder='回复' placeholderClass='inputHf' />
            </View>
        </View>
    )
  }
}
